package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;
import android.widget.ViewFlipper;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

        private MusicSever music;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

            ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper);
            flipper.startFlipping();

        }
        @Override
        protected void onPause() {
            // TODO Auto-generated method stub
            super.onPause();
            music.stop(this);
        }


        @Override
        protected void onResume() {
            // TODO Auto-generated method stub
            super.onResume();
            music.play(this, R.raw.bgmusic);
        }
    }
}
